<br /><br />
<?php if(isset($this->form)): ?>
 <form method="post">
     <div class="form-group">
        <label for="name">Category Name:</label><br>
        <select name="categoryname">
            <?php foreach($this->form as $data):?>
            <option value="<?php echo $data['cat_id'];?>"><?php echo $data['name'];?></option>
            <?php endforeach;?>
        </select>
        
    </div>
    <div class="form-group">
        <label for="name">Section Name:</label><br>
        <input type="text" name="name" required>
    </div>
     <div class="form-group">
         <label for="description">Description:</label><br>
        <textarea name="description" required style="width:400px;height:100px"></textarea>
    </div>
     <input type="submit" class="btn btn-primary" value="Add Section">
</form>
<?php else: ?>
<h3>You should create a category </h3>
<?php endif;?>
